﻿namespace DeHeng_Mes.Constant
{

    /// <summary>
    /// 系统常量
    /// </summary>
    class SystemConstant
    {

        #region 类名匹配常量

        public const string Code = "Code";
        public const string DeviceErrorMessage = "DeviceErrorMessage";
        public const string StationStatus = "StationStatus";
        public const string Power = "Power";
        public const string ProduceOperation = "ProduceOperation";
        public const string ProduceOrder = "ProduceOrder";
        public const string StationError = "StationError";
        public const string Beat = "Beat";
        public const string DeviceErrorStatus = "DeviceErrorStatus";
        public const string Collection = "Collection";
        public const string ProduceStatus = "ProduceStatus";
        public const string CodeHelper = "CodeHelper";
        public const string IssuedCode = "IssuedCode";

        #endregion

        #region 线体名称匹配常量

        public const string Left = "left";
        public const string Right = "right";
        public const string Small = "small";
        public const string StudWeld = "studWeld";
        public const string Fds = "fds";

        #endregion

        #region 订单状态常量
        public const string Ok = "1";
        public const string nOk = "2";
        public const string nCreate = "0";
        public const string illegal = "-1";
        #endregion

        #region 数据采集状态常量
        public const string InsertTableIllegal = "2";
        public const string dataNotCreate = "0";
        public const string InsertDataIllegal = "1";
        #endregion

        #region 订单状态常量
        public const string DeviceOk = "2";
        public const string DeviceNOk = "1";
        #endregion

        #region db块
        public const int Write = 6005;
        public const int Hart = 6011;
        public const int Order = 6008;
        public const int GetCode = 6014;
        #endregion

        #region 线程阻塞常量
        public const int Polling = 10000;
        #endregion

        #region 数采文件路径常量
        public const string RightGlueRemovalPath = @"D:\chujiao\右侧围R73视觉检测\AirRobots\VisionXData\Images\";
        public const string LeftGlueRemovalPath = @"D:\chujiao\左侧围R73视觉检测\AirRobots\VisionXData\Images\";

        public const string fdsCopyPath = @"D:\chujiao\SeqFds2";
        public const string fdsLoadPath = @"D:\chujiao\SeqFds\";

        public const string swOriginPath = @"C:\IVOSTUD\IVOSTUD Data Files\";
        public const string swSavePath = @"D:\chujiao\sw\";
        public const string swSuffix = "Prozessdaten";

        public const string leftGluesharedFoldUsername = "m2iftp";
        public const string leftGluesharedFoldPassword = "yq123456";
        public const string leftGlueSavePath = @"F:\云起F3线体Mes\F3工艺设备数据文件\chujiao\leftglueblead\F3\";
        public const string leftGlueSaveImgPath = @"F:\云起F3线体Mes\F3工艺设备数据文件\chujiao\rightgluebead\pic\ErrorImages\";
        public const string leftGluesharedFoldImgPath = @"\\192.168.6.242\pic\ErrorImages\";
        public const string leftGluesharedFoldPath = @"\\192.168.6.242\GlueBeadInfo\F3\";

        public const string rightGluesharedFoldPath = @"\\192.168.6.242\GlueBeadInfo\F3\";
        public const string rightGluesharedFoldUsername = "m2iftp";
        public const string rightGluesharedFoldPassword = "yq123456";
        public const string rightGlueSavePath = @"F:\云起F3线体Mes\F3工艺设备数据文件\chujiao\SeqFds\";
        public const string rightGlueSaveImgPath = @"F:\云起F3线体Mes\F3工艺设备数据文件\chujiao\rightgluebead\pic\ErrorImages\";
        public const string rightGluesharedFoldImgPath = @"\\192.168.6.242\pic\ErrorImages\";

        public const string smallGluesharedFoldPath = @"\\192.168.6.242\GlueBeadInfo\F3\";
        public const string smallGluesharedFoldUsername = "m2iftp";
        public const string smallGluesharedFoldPassword = "yq123456";
        public const string smallGlueSavePath = @"F:\云起F3线体Mes\F3工艺设备数据文件\chujiao\SeqFds\";
        public const string smallGlueSaveImgPath = @"F:\云起F3线体Mes\F3工艺设备数据文件\chujiao\rightgluebead\pic\ErrorImages\";
        public const string smallGluesharedFoldImgPath = @"\\192.168.6.242\pic\ErrorImages\";

        public const string leftGlueCopyPath = @"D:\chujiao\Left65Glue\";
        public const string leftGlueLoadPath = @"/SdCard1/ExportData/TS_Log/Logging/LOG_5/";
        public const string rightGlueCopyPath = @"D:\chujiao\RightR65Glue\";
        public const string rightGlueLoadPath = @"/SdCard1/ExportData/TS_Log/Logging/LOG_5/";
        public const string smallGlueCopyPath = @"D:\chujiao\smallGlue\";
        public const string smallGlueLoadPath = @"/SdCard1/ExportData/TS_Log/Logging/LOG_5/";

        public const string SpotWeldingPath = @"\\192.168.6.244\DATAcsv2\";
        #endregion

        #region 数采读取天数限制
        public const int day = 8;
        #endregion

        #region 数采错误数据保存天数限制
        public const int errorDay = 1;
        #endregion

        #region 数据库用户信息
        public const string MySqlName = "root";
        public const string MySqlPassWord = "cqyq-123456";
        #endregion

        #region 调用接口Url
        public const string ProduceHourUrl = "http://" + FACTORY_MES_IP + ":" + FACTORY_MES_PORT + "/dh-mes/production/processTask/yieldAnalysis";
        public const string ProduceOperationUrl = "http://" + FACTORY_MES_IP + ":" + FACTORY_MES_PORT + "/dh-mes/production/processTask/processReport";
        public const string AndonUrl = "http://" + FACTORY_MES_IP + ":" + FACTORY_MES_PORT + "/dh-mes/andon/andonCall/autoCall";
        public const string StartTimeUrl = "http://" + FACTORY_MES_IP + ":" + FACTORY_MES_PORT + "/dh-mes/production/orderInfo/chime";
        public const string BossProducePutUrl = "http://" + FACTORY_MES_IP + ":" + FACTORY_MES_PORT + "/dh-mes/production/orderInfo/report";
        #endregion

        #region DB块常量
        public const int DB6000 = 6000;
        public const int DB6001 = 6001;
        public const int DB6002 = 6002;
        public const int DB6003 = 6003;
        public const int DB6004 = 6004;
        public const int DB6005 = 6005;
        public const int DB6006 = 6006;
        public const int DB6007 = 6007;
        public const int DB6008 = 6008;
        public const int DB6009 = 6009;
        public const int DB6010 = 6010;
        public const int DB6011 = 6011;
        public const int DB6012 = 6012;
        public const int DB6013 = 6013;
        public const int DB6014 = 6014;
        public const int DB6015 = 6015;
        #endregion

        #region 调用工厂Mes接口常量
        public const string FACTORY_MES_IP = "192.168.20.2";
        public const string FACTORY_MES_PORT = "8081";
        public const string FACTORY_MES_USERNAME = "dh-f3-line";
        public const string FACTORY_MES_PASSWORD = "MvqlVf13Wd9qDInTlMgEdO7L2so4S4AutU6eyoN90fMS5fltFRHcqhBEE+1z6frGed+22XcMy//cYm6jjRWtrw==";
        public const string FACTORY_MES_TOKEN_CACHE_KEY = "token";
        public const double FACTORY_MES_TOKEN_CACHE_EXPIRY = 20;
        #endregion

        #region
        public const string LINENAME = "W03-左右门槛线";
        #endregion

        #region 类名调用字符串常量
        public const string W03_PLC_01_STATUS = "W03_PLC_01_STATUS";
        public const string W03_PLC_02_STATUS = "W03_PLC_02_STATUS";
        public const string W03_PLC_03_STATUS = "W03_PLC_03_STATUS";
        public const string W03_PLC_04_STATUS = "W03_PLC_04_STATUS";
        #endregion

        #region 物料编码通用字段
        public const string MATERIALID = "";
        #endregion

        #region 工单相关偏移量与DB
        public const int ORDER_DB = 6000;
        public const int ORDER_ID_OFF = 0;
        public const int ORDER_PRODUCENUM_OFF = 256;
        public const int ORDER_MATERIALCODE_OFF = 258;
        public const int ORDER_STATUS_OFF = 514;


        public const int ORDER_CARTEPY_OFF = 256;
        public const int ORDER_PLCSTARTWORK_OFF = 512;
        public const int ORDER_ORDEREND_OFF = 512;
        public const int ORDER_PLCENDWORK_OFF = 512;
        public const int ORDER_ORDERSAVE_OFF = 512;
        public const int ORDER_PLCSTARTWORK_BIT = 512;
        public const int ORDER_ORDEREND_BIT = 512;
        public const int ORDER_PLCENDWORK_BIT = 512;
        public const int ORDER_ORDERSAVE_BIT = 512;
        #endregion

        #region 字段名调用字符串常量
       // public const string OP45L = "Op45L";
        public const string OP50L = "Op50L_1";
        public const string OP50R = "Op50R_1";
        public const string OP50L_1 = "Op50L_2";
        public const string OP50R_1 = "Op50R_2";

        public const string S02_OP10L = "S2-OP10L";
        public const string S02_OP10R = "S2-OP10R";
        public const string S02_OP20L = "S2-OP20L";
        public const string S02_OP20R = "S2-OP20R";
        public const string S01_OP10L = "S1-OP10L";
        public const string S01_OP10R = "S1-OP10R";
        public const string S01_OP20L = "S1-OP20L";
        public const string S01_OP20R = "S1-OP20R";

        public const string S03_OP10L = "S03-OP10L";
        public const string S03_OP10R = "S03-OP10R";

        public const string S03_OP20L = "S03-OP20L";
        public const string S03_OP20R = "S03-OP20R";
        public const string OP10L1 = "OP10L1";
        public const string OP10L2 = "OP10L2";
        public const string OP10R1 = "OP10R1";
        public const string OP10R2 = "OP10R2";
        public const string OP20L1 = "OP20L1";
        public const string OP20L2 = "OP20L2";
        public const string OP20R1 = "OP20R1";
        public const string OP20R2 = "OP20R2";
        public const string OP30L = "OP30L";
        public const string OP30R = "OP30R";
        public const string OP40L = "OP40L";
        public const string OP40R = "OP40R";
        public const string OP45L = "OP45L";
        public const string R1 = "R1";
        public const string R2 = "R2";
        public const string R3L = "R3L";
        public const string R4L = "R4L";
        public const string R5L = "R5L";

        public const string R3 = "R3";
        public const string R4 = "R4";
        public const string R5 = "R5";

        public const string R3R = "R3R";
        public const string R4R = "R4R";
        public const string R5R = "R5R";
        public const string OP90L = "Op90L";
        public const string OP90R = "Op90R";

        public const string OP100L = "Op100L";
        public const string OP100R = "Op100R";
        public const string OP120L = "Op120L";
        public const string OP120R = "Op120R";
        public const string OP130L = "Op130L";
        public const string OP130R = "Op130R";

        public const string OP140L = "Op140L";
        public const string OP140R = "Op140R";
        public const string OP150L = "Op150L";
        public const string OP150R = "Op150R";
        public const string OP160L = "Op160L";
        public const string OP160R = "Op160R";
        public const string OP170L = "Op170L";
        public const string OP170R = "Op170R";
        public const string OP180L = "Op180L";
        public const string OP180R = "Op180R";
        public const string OP190L = "Op190L";
        public const string OP190R = "Op190R";
        public const string OP200L = "Op200L";
        public const string OP200R = "Op200R";

        public const string OP210L = "Op210L";
        public const string OP210R = "Op210R";
        public const string OP220L = "Op220L";
        public const string OP220R = "Op220R";
        public const string OP230L = "Op230L";
        public const string OP230R = "Op230R";
        public const string OP240L = "Op240L";
        public const string OP240R = "Op240R";
        public const string OP250L = "Op250L";
        public const string OP250R = "Op250R";
        public const string OP260L = "Op260L";
        public const string OP260R = "Op260R";
        public const string OP270L = "Op270L";
        public const string OP270R = "Op270R";
        public const string OP280L = "Op280L";
        public const string OP280R = "Op280R";
        public const string NgStationL = "NgStationL";
        public const string NgStationR = "NgStationR";

        public const string STATION = "Station";
        public const string BATCH = "Batch";
        public const string TYPE = "Type";
        public const string WORKER = "Worker";
        public const string RBNO = "RBNo";
        public const string CODE1 = "Code1";
        public const string CODE2 = "Code2";
        public const string CODE3 = "Code3";
        public const string CODE4 = "Code4";
        public const string STARTTIME = "StartTime";
        public const string ENDTIME = "EndTime";
        public const string BEAT = "Beat";
        public const string RESULT = "Result";
        #endregion

        #region 数组数据读取常量
        public const int ALL_STARTOFF = 0;

        public const int PLC01_STATUS_DB = 5000;
        public const int PLC01_STATUS_STARTOFF = 0;
        public const int PLC01_STATUS_ENDOFF = 550;

        public const int PLC02_STATUS_DB = 5000;
        public const int PLC02_STATUS_STARTOFF = 0;
        public const int PLC02_STATUS_ENDOFF = 300;

        public const int PLC03_STATUS_DB = 5000;
        public const int PLC03_STATUS_STARTOFF = 0;
        public const int PLC03_STATUS_ENDOFF = 700;

        public const int PLC04_STATUS_DB = 5000;
        public const int PLC04_STATUS_STARTOFF = 0;
        public const int PLC04_STATUS_ENDOFF = 900;



        public const int PLC01_CCD_DB = 5020;
        public const int PLC01_CCD_STARTOFF = 0;
        public const int PLC01_CCD_ENDOFF = 2979;

        public const int PLC02_WELD_DB = 5010;
        public const int PLC02_WELD_STARTOFF = 0;
        public const int PLC02_WELD_ENDOFF = 45824;

        public const int PLC02_CNC_DB = 5040;
        public const int PLC02_CNC_STARTOFF = 0;
        public const int PLC02_CNC_ENDOFF = 259;

        public const int PLC02_CNC_DATA_DB = 5030;
        public const int PLC02_CNC_DATA_STARTOFF = 0;
        public const int PLC02_CNC_DATA_ENDOFF = 96;

        public const int PLC03_WELD_DB = 5010;
        public const int PLC03_WELD_STARTOFF = 0;
        public const int PLC03_WELD_ENDOFF = 65500;

        public const int PLC03_WELDVISION_DB = 5020;
        public const int PLC03_WELDVISION_STARTOFF = 0;
        public const int PLC03_WELDVISION_ENDOFF = 382;

        public const int PLC03_TIGHTEN_DB = 5030;
        public const int PLC03_TIGHTEN_STARTOFF = 0;
        public const int PLC03_TIGHTEN_ENDOFF = 779;

        public const int PLC04_TIGHTEN_DB = 5040;
        public const int PLC04_TIGHTEN_STARTOFF = 0;
        public const int PLC04_TIGHTEN_ENDOFF = 780;

        public const int PLC04_GLUE_DB = 5010;
        public const int PLC04_GLUE_STARTOFF = 0;
        public const int PLC04_GLUE_ENDOFF = 668;

        public const int PLC04_FDS_DB = 5020;
        public const int PLC04_FDS_STARTOFF = 0;
        public const int PLC04_FDS_ENDOFF = 520;

        public const int PLC04_CCD_DB = 5080;
        public const int PLC04_CCD_STARTOFF = 0;
        public const int PLC04_CCD_ENDOFF = 4305;

        public const int PLC04_POINT_DB = 5090;
        public const int PLC04_POINT_STARTOFF = 0;
        public const int PLC04_POINT_ENDOFF = 504;
        #endregion

        #region 数据文件路径
        #endregion
    }
}
